import { createApp } from 'vue'
import { ElMessage } from 'element-plus'
import { MotionPlugin } from '@vueuse/motion'
import App from './App.vue'
import pinia from '@/store/index.ts'
import router from './router'
import request from '@/utils/request.ts'
import registerComponent from './plugins/registerComponent.ts'
import { initConfig } from './config'
import i18n from './language/i18n.ts'
import 'virtual:svg-icons-register'
import 'element-plus/theme-chalk/dark/css-vars.css'
import 'element-plus/dist/index.css'
import './styles/index.scss'

window.$message = ElMessage
const app = createApp(App)

app.config.globalProperties.$http = request

app.use(pinia).use(router).use(i18n).use(registerComponent).use(initConfig).use(MotionPlugin)
app.mount('#app')
